<?php
    require('../conn.php');
    require('../functions.php');
    $aid=$_GET['aid'];
    $row=$mysql->query("select * from `kaddata` where  `id`='{$aid}' limit 1");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<head>
    <meta http-equiv="Content-Type" content="text/HTML; charset=utf-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
    <link rel="stylesheet" type="text/css" href="css/download.css" /
    <title>点击右上角--></title>    
    <script type="text/javascript">
    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
        // 通过下面这个API隐藏右上角按钮
        WeixinJSBridge.call('showOptionMenu');
    });
        // function install(url) {
        //     var a = document.createElement("a");
        //     if (!a.click) {
        //         window.location = url;
        //         return;
        //     }
        //     a.setAttribute("href", url);
        //     a.style.display = "none";
        //     document.body.appendChild(a);
        //     a.click();
        // }
        
    </script>   
</head>
<body>
<div class="all">
	<div class="down_load_bg">
	<!-- 放app logo的地方 -->
	  	<img src="<?php echo $row[0]['kad_logo']?>">
    </div>
    <div class="down_load_btn">
    	<a href="#">下载</a>
    </div>-
    <div class="newer3_wrap">
    	<div class="newer3_row">
        	<div class="newer3_go1">
            	<img src="img/icon_go1.png">
            </div>
        </div>
        <div class="newer3_row">
            <div class="newer3_con" id="newer3_con1">
                <div class="num_ball">
                	1
                </div>
                <div class="newer3_text">
                	点击右上角，打开菜单
                </div>
                <div class="newer3_icon">
                	<img src="img/icon_more.png">
                </div>
            </div>
        </div>
        <div class="newer3_row">
        	<div class="newer3_go2">
            	<img src="img/icon_go2.png">
            </div>
        </div>
        <div class="newer3_row">
            <div class="newer3_con" id="newer3_con2">
                <div class="num_ball">
                	2
                </div>
                <div class="newer3_text">
                	找到右图图标，<br/>点击在safari中打开
                </div>
                <div class="newer3_icon">
                	<img src="img/icon_safari.png">
                </div>
            </div>
        </div>
        <div class="newer3_row">
        	<div class="newer3_go3">
            	<img src="img/icon_go3.png">
            </div>
        </div>
        <div class="newer3_row">
            <div class="newer3_con" id="newer3_con3">
                <div class="num_ball">
                	3
                </div>
                <div class="newer3_text" style="line-height:46px;">
                	<em>安装应用并打开</em>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
is_weixin();

function is_weixin(){  
    var ua = navigator.userAgent.toLowerCase();  
    if(ua.match(/MicroMessenger/i)=="micromessenger") {  
        return true;  
    } else {  
    	//app下载地址 替换install
        window.location.href = "<?php echo $row[0]['kad_url']?>"
        // install("<?php echo $row[0]['kad_url']?>");
    }  
}
</script>
<p style="display:none;">
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F96418bfd7b74758c8311312c75e95865' type='text/javascript'%3E%3C/script%3E"));
</script>
</p>
<?php
$mysql->__destruct();
$mysql->close();
?>
</body>
</html>